package cn.itcast.controller;

import java.util.Date;

import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.itcast.pojo.User;

@RestController
public class Controller  {
	@RequestMapping("hello")
	public String show(){
		
		return"hello,springboot";
	}
    @RequestMapping("hei/{name}")
	public String getName(@PathVariable String name){
    	return "hello,"+name;
		
	}
    @RequestMapping("user")
    public User getUser(){
    	
    	User user = new User();
    	user.setName("赵云");
    	user.setAge(18);
    	user.setSex("女");
    	user.setCreateTime(new Date());
    	return user;
    }
}
